{extend name="public/base"/}
{block name="body"}
<div class="main-box no-header clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>{$topup_id|get_table_field="id","name","topup"}-{$meta_title} </h2>
		</div>
		<div class="pull-right">
			<a href="{:url('addcode',array('id'=>$topup_id))}" class="btn btn-primary ">  生 成</a>
			<button class="btn btn-danger ajax-post confirm" url="{:url('delcode')}" target-form="ids">删 除</button>
		</div>
	</header>
	<div class="main-box-body clearfix">
		<div class="table-responsive">
      <table class="table table-striped table-hover">
        <thead>
          <tr>
            <th width="30"><input class="checkbox check-all" type="checkbox"></th>
            <th width="60">ID</th>
            <th>用户ID</th>
            <th>微信昵称</th>
            <th>充值码</th>
            <th>充值金额</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          {volist name="list" id="item"}
          <tr>
            <td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
            <td>{$item['id']}</td>
            <td>{$item['uid']}</td>
            <td>{$item['uid']|get_table_field="id","nickname","WxUser"}</td>
            <td>{$item['code']}</td>
            <td>{$item['sum']}</td>
            <td>{eq name="item['status']" value='1'}
							已充值
							{else /}
							未使用
							{/eq}</td>
            <td>
              <a href="{:url('delcode',array('id'=>$item['id']))}" class="confirm ajax-get">删除</a>
            </td>
          </tr>
          {/volist}
        </tbody>
      </table>
      {$list->render()}
		</div>
	</div>
</div>
{/block}
